from PIL import Image

img = Image.open('6003.jpg')
rgb2xyz = (
        0.412453, 0.357580, 0.180423, 0,
        0.212671, 0.715160, 0.072169, 0,
        0.019334, 0.119193, 0.950227, 0 )
out = img.convert('RGB', rgb2xyz)
getcolor = img.getcolors()
print getcolor
